<template xmlns:v-clipboard="http://www.w3.org/1999/xhtml">
    <transition>
        <div>
            <button v-clipboard:copy="message"
                    v-clipboard:success="onCopy"
                    v-clipboard:error="onError">clipboard
            </button>
            <canvas id="canvas"></canvas>
        </div>

    </transition>
</template>
<script>

    export default {
        name: 'modal',
        created() {
        },
        data() {
            return {
                message: 1000
            }
        },
        methods: {
            onCopy: function () {
                alert("success")
            },
            onError: function () {
                alert("error")
            }
        }
    }
</script>
